package org.aspect.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.aspect.interfaces.Authority;

/**
 * 用户信息实体类
 *
 * @author LiKun
 * @date 2021/8/20 13:31
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("用户相关实体类")
public class People implements Authority {
    public static final String AUTHORITY_NAME = "USER";

    @ApiModelProperty(name = "age", notes = "年龄")
    private int age;

    @ApiModelProperty(name = "name", notes = "姓名")
    private String name;

    @ApiModelProperty(name = "authority", notes = "权限")
    private String authority;

    public People(int age, String name) {
        this.age = age;
        this.name = name;
        this.authority = AUTHORITY_NAME;
    }

    @Override
    public String getAuthority() {
        return authority;
    }
}
